#include<bits/stdc++.h>
using namespace std;
int n;
double ans=1e18;
double len[1000005];
bool cmp(double A,double B){
	return A>B;
}
double w(double x){
	double sum=max(len[1]+x*x,len[1]+(1.0-x)*(1.0-x));
	double l=x,r=1-x;
	for(int i=2;i<=n;i++){
		if(l<r){
			l+=1.0;
			sum=max(sum,len[i]+l*l);
		}else{
			r+=1.0;
			sum=max(sum,len[i]+r*r);
		}
	}
	ans=min(ans,sum);
	return sum;
}
int main(){
	freopen("temple.in","r",stdin);
	freopen("temple.out","w",stdout);
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		double x,y;
		scanf("%lf %lf",&x,&y);
		len[i]=min(x*x/4+y*y,y*y/4+x*x);
	}
	sort(len+1,len+n+1,cmp);
	double l=0,r=1;
	while(l+1e-8<r){
		double mid1=((r-l)*1.0000000/3)+l;
		double mid2=r-((r-l)*1.0000000/3);
		double nxt1=w(mid1);
		double nxt2=w(mid2);
		if(w(l)>nxt1&&nxt1>nxt2){
			l=mid1;
		}else{
			r=mid2;
		}
	}
	printf("%.10lf",sqrt(ans));
	return 0;
}
